/***************************************************************************
 *   Copyright (C) 2008 by Justin L. Boss                                  *
 *   justin@rtechguys.com                                                  *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef OCEAN_H
#define OCEAN_H

#include <QGLWidget>
#include "seacreature.h"
#include "koceansetting.h"
#include "wavemap.h"
//#include <QtDebug>

class Ocean : public QGLWidget
{
//Q_OBJECT
protected:
    void resizeGL(GLint width, GLint height);
    void paintGL();
    void initializeGL();
    GLint SharkTex;
    GLint SpadeTex;
    GLint GreatWhiteTex;
    GLint BarracudaTex;
    GLint SailfishTex;
    GLint RockTex;
    GLint WoodTex;
    GLint StoneWallTex;
    GLint SandTex;
    GLint RayTex;
    GLint OrcaTex;
    GLint TripletailTex;
    GLint CaustCounter;
    //GLfloat ColorBackground[4];
    //GLfloat LightAmbient[4];
    //GLfloat LightDiffuse[4];
    //GLfloat LightPosition[4];
    //GLfloat fogColor[4];
    GLint TopCaustTex[32];
    GLint BtmCaustTex[32];
public:
    Ocean(QWidget *parent= 0);
    ~Ocean();
    Settings *settings;
    void timerEvent(QTimerEvent *) {updateGL();};
    GLint LoadImageFile(const char* ImageFile);
    SeaCreature **orca;
    SeaCreature **shark;
    SeaCreature **greatwhite;
    SeaCreature **barracuda;
    SeaCreature **sailfish;
    SeaCreature **spade;
    SeaCreature **tripletail;
    //SeaCreature *ray_r[1];
    //SeaCreature *ray_l[1];
    WaveMap *wave;
};

#endif
